import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizDemanInfomation = (params) => {
  params.head.transCode = 'queryBizDemanInfomation';
  return request({
    url: '/biz/bizDemanInfomation/queryBizDemanInfomation',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizDemanInfomationListPage = (params) => {
  params.head.transCode = 'queryBizDemanInfomationListPage';
  return request({
    url: '/biz/bizDemanInfomation/queryBizDemanInfomationListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizDemanInfomation = (params) => {
  params.head.transCode = 'saveBizDemanInfomation';
  return request({
    url: '/biz/bizDemanInfomation/saveBizDemanInfomation',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizDemanInfomationList = (params) => {
  params.head.transCode = 'saveBizDemanInfomationList';
  return request({
    url: '/biz/bizDemanInfomation/saveBizDemanInfomationList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizDemanInfomation = (params) => {
  params.head.transCode = 'saveOrUpdateBizDemanInfomation';
  return request({
    url: '/biz/bizDemanInfomation/saveOrUpdateBizDemanInfomation',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizDemanInfomationList = (params) => {
  params.head.transCode = 'saveOrUpdateBizDemanInfomationList';
  return request({
    url: '/biz/bizDemanInfomation/saveOrUpdateBizDemanInfomationList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizDemanInfomation = (params) => {
  params.head.transCode = 'updateBizDemanInfomation';
  return request({
    url: '/biz/bizDemanInfomation/updateBizDemanInfomation',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizDemanInfomation = (params) => {
  params.head.transCode = 'deleteBizDemanInfomation';
  return request({
    url: '/biz/bizDemanInfomation/deleteBizDemanInfomation',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizDemanInfomationList = (params) => {
  params.head.transCode = 'deleteBizDemanInfomationList';
  return request({
    url: '/biz/bizDemanInfomation/deleteBizDemanInfomationList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizDemanInfomationExcel = (params) => {
  downloadExcel({
    url: '/biz/bizDemanInfomation/excelDownload/exportBizDemanInfomationExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
